{extend name="common:base" /}

{block name="main"}
<div class="admin-content-body">
    <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">留言管理</strong> / <small>Msg Management</small></div>
    </div>
    <ul class="am-avg-sm-1 am-avg-md-4 am-margin am-padding am-text-center admin-content-list ">
        <li><a href="{:url('admin/feedback/today')}" class="am-text-success">
            <span class="am-icon-btn am-icon-cart-plus"></span><br/>今日新增<br/>{$today}</a></li>
        <li><a href="{:url('admin/feedback/week')}" class="am-text-danger">
            <span class="am-icon-btn am-icon-cart-arrow-down"></span><br/>一周以内<br/>{$week}</a></li>
        <li><a href="{:url('admin/feedback/month')}" class="am-text-warning">
            <span class="am-icon-btn am-icon-bar-chart"></span><br/>一月以内<br/>{$month}</a></li>
        <li><a href="{:url('admin/feedback/all')}" class="am-text-secondary">
            <span class="am-icon-btn am-icon-user-md"></span><br/>全部留言<br/>{$all}</a></li>
    </ul>
    <div class="am-g">
        <div class="am-u-sm-12">
            <div class="am-panel am-panel-default">
                <div class="am-panel-hd am-cf" data-am-collapse="{target: '#collapse-panel-3'}">快速处理留言<span class="am-icon-chevron-down am-fr"></span></div>
                <div class="am-panel-bd am-collapse am-in am-cf" id="collapse-panel-3">
                    <ul class="am-comments-list admin-content-comment">

                        {volist name="top10" id="vo"}
                        <li class="am-comment">
                            <a href="#"><img src="http://s.amazeui.org/media/i/demos/bw-2014-06-19.jpg?imageView/1/w/96/h/96" alt="" class="am-comment-avatar" width="48" height="48"></a>
                            <div class="am-comment-main">
                                <header class="am-comment-hd">
                                    <div class="am-comment-meta"><a href="#" class="am-comment-author">{$vo.user_id|get_username}</a> 留言于
                                        <time>{$vo.create_time|get_time_diff=time(),###}</time>前
                                    </div>
                                </header>
                                <div class="am-comment-bd">
                                    <p>{$vo.msg}</p>

                                    <table>
                                        <tr height=22>
                                            <td><a onclick="expand({$vo.id})"
                                                    href="javascript:void(0);">回复</a></td></tr>
                                        <tr height=4>
                                            <td></td>
                                        </tr>
                                    </table>
                                    <table id="child{$vo.id}" style="display: none">
                                        <tr>
                                            <td>
                                                <textarea name="reply" cols="50" rows="5"></textarea>
                                                <p><a href="#">提交</a></p>
                                            </td>
                                        </tr>
                                    </table>

                                </div>
                            </div>
                        </li>
                        {/volist}

                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
function expand(el)
{
    childobj = document.getElementById("child" + el);

    if (childobj.style.display == 'none')
    {
        childobj.style.display = 'block';
    }
    else
    {
        childobj.style.display = 'none';
    }
    return;
}
</script>
{/block}